package com.atguigu.Ioc_05;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package com.atguigu.Ioc_04
 * @date 2024/4/21 下午7:05
 */
public class JavaBeanFactoryBean implements FactoryBean<JavaBean> {

    private String value;


    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public JavaBean getObject() throws Exception {
        JavaBean javaBean = new JavaBean();
        javaBean.setName(value);
        return javaBean;
    }

    @Override
    public Class<?> getObjectType() {
        return JavaBean.class;
    }
}
